import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'plate_lpr_method_channel.dart';

abstract class PlateLprPlatform extends PlatformInterface {
  /// Constructs a PlateLprPlatform.
  PlateLprPlatform() : super(token: _token);

  static final Object _token = Object();

  static PlateLprPlatform _instance = MethodChannelPlateLpr();

  /// The default instance of [PlateLprPlatform] to use.
  ///
  /// Defaults to [MethodChannelPlateLpr].
  static PlateLprPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [PlateLprPlatform] when
  /// they register themselves.
  static set instance(PlateLprPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> recog({EOpenType openType = EOpenType.NoPlate}) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  void deletePic() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }
}

/// 打开方式
enum EOpenType{
  /// 允许无牌车
  NoPlate("2"),

  /// 允许输入
  Input("1");

  final String value;
  const EOpenType(this.value);
}